import { request } from '@/utils/request.js'

export default {
  /**
   * 查詢報名審核列表
   * @param {object} data
   * @param {string} data.uid
   * @param {string} data.nickname
   * @param {string} data.phone
   * @param {string} data.email
   * @param {number} data.status
   * @param {string} data.startTime
   * @param {string} data.endTime
   * @param {number} data.pageNum
   * @param {number} data.pageSize
   * @returns
   */
  getRegistrationList(data = {}) {
    return request({
      url: '/api/v1/admin/registration/list',
      method: 'post',
      data
    })
  },

  /**
   * 導出報名名單
   * @param {object} data
   * @param {string} data.uid
   * @param {string} data.nickname
   * @param {string} data.phone
   * @param {string} data.email
   * @param {number} data.status
   * @param {string} data.startTime
   * @param {string} data.endTime
   * @param {number} data.pageNum
   * @param {number} data.pageSize
   * @returns
   */
  registrationExport(data = {}) {
    return request({
      url: '/api/v1/admin/registration/export',
      method: 'post',
      data
    })
  },
  /**
   * 批量審批報名申請
   * @param {object} data
   * @param {array} data.uidList
   * @param {number} data.status
   * @returns
   */
  registrationBatchApproval(data = {}) {
    return request({
      url: '/api/v1/admin/registration/batch-approval',
      method: 'post',
      data
    })
  },
  registrationUploadExcel(data = {}) {
    return request({
      url: '/api/v1/admin/registration/csv-import-approval',
      method: 'post',
      data
    })
  }
}
